import { createWebHistory, createRouter } from 'vue-router'
import Home from "../views/Home.vue"
import Login from "../views/Login.vue"


//配置路径关系
const routes = [
  {
    path:"/",
    component:Home
  },
  {
    path:"/login",
    component:Login
  },
  {
    path:"/dd",
    component:() => import("../views/Order.vue")
},
  {
    path:"/my",
    component:() => import("../views/My.vue")
},
  {
    path:"/fw",
    component:() => import("../views/Service.vue")
}, {
  path:"/qs"
  ,component:() => import("../views/Compatible.vue")
}, 
{
  path:"/outlet/:id/"
  ,component:() => import("../views/Outlet.vue")
},
{
  path:"/order"
  ,component:() => import("../views/PutOrder.vue")
}, {
  path:"/set"
  ,component:() => import("../views/Setting.vue")
}, {
  path:"/user"
  ,component:() => import("../views/User.vue")
},
{
  path:"/avatar"
  ,component:() => import("../views/Avatar.vue")
}
]

//将创建的配置关系挂载到router实例上
const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router